/*
 * @Author: hutong huareu980@163.com
 * @Date: 2023-06-05 09:32:39
 * @LastEditors: hutong huareu980@163.com
 * @LastEditTime: 2023-06-09 16:06:51
 * @FilePath: /smart-web-admin/src/api/job/index.ts
 * @Description:
 */
import request from '/@/utils/request';
export function useJobApi() {
	return {
		list: (params: object) => {
			return request({
				url: '/p',
				method: 'get',
				params,
			});
		},
		add: (data: object) => {
			return request({
				url: '/p',
				method: 'post',
				data,
			});
		},
		edit: (id: number, data: object) => {
			return request({
				url: `/p/${id}`,
				method: 'put',
				data,
			});
		},
		del: (id: number, params?: object) => {
			return request({
				url: `/p/${id}`,
				method: 'delete',
				params,
			});
		},
		detail: (id: number, params?: object) => {
			return request({
				url: `/p/${id}`,
				method: 'get',
				params,
			});
		},
	};
}
